<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>保险管理</title>
    <link th:include="common/header::copy"/>
</head>
<body style="margin: 1px">
<table id="dg" title="保险管理" class="easyui-datagrid"
       fitColumns="true" pagination="true" rownumbers="true" singleSelect="true"
       url="/insurance/in-insurance/list" fit="true" toolbar="#tb" striped="true" method="post">
    <thead>
    <th field="id" align="center" hidden="true">编号</th>
    <th field="cno" align="center">保单号</th>
    <th field="cname" align="center">保险名称</th>
    <th field="company" align="center">保险公司</th>
    <th field="ctext5" align="center">保险类型</th>
    <th field="startdate" align="center">投保日期</th>
    <th field="ctext6" align="center">保险周期</th>
    <th field="vidcard" align="center">车牌号</th>
    <th field="ctext1" align="center">司机姓名</th>
    <th field="ctext2" align="center">司机手机</th>
    <th field="ctext3" align="center">队长姓名</th>
    <th field="ctext4" align="center">队长手机</th>
    <th field="createTime" align="center">创建时间</th>
    <th field="lastTime" align="center">最后修改时间</th>
    <th field="opid" align="center">操作员账号</th>
    <th field="op" align="center" formatter="formatOp">操作</th>
    </thead>
</table>

<div id="tb">
    <div>
        <a href="javascript:openInsuranceAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
        <a class="easyui-linkbutton" plain="true" onclick="importInsurance()" data-options="iconCls:'icon-large_chart'">导入表格</a>
        <a class="easyui-linkbutton" plain="true" onclick="exportInsurance()" data-options="iconCls:'icon-large_chart'">导出表格</a>
    </div>
    <div>
        <p class="search" align="center">
            &nbsp;车牌号：&nbsp;<input type="text" id="s_vidcard" size="20"
                                   onkeydown="if(event.keyCode==13) searchInsurance()"/>
            司机姓名：&nbsp;<input type="text" id="s_ctext1" size="20" onkeydown="if(event.keyCode==13) searchInsurance()"/>
            司机手机：&nbsp;<input type="text" id="s_ctext2" size="20" onkeydown="if(event.keyCode==13) searchInsurance()"/>
        </p>
        <p class="search" align="center">
            队长姓名：&nbsp;<input type="text" id="s_ctext3" size="20" onkeydown="if(event.keyCode==13) searchInsurance()"/>
            队长手机：&nbsp;<input type="text" id="s_ctext4" size="20" onkeydown="if(event.keyCode==13) searchInsurance()"/>
            保单类型：&nbsp;<select id="s_ctype" onkeydown="if(event.keyCode==13) searchInsurance()">

        </select>
        </p>
        <p class="search" align="center">
            投保周期：&nbsp;<select id="s_insureType" onkeydown="if(event.keyCode==13) searchInsurance()">

        </select>
            保单号：&nbsp;<input type="text" id="s_cno" size="20" onkeydown="if(event.keyCode==13) searchInsurance()"/>
            <a href="javascript:searchInsurance()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
        </p>
    </div>
</div>


<div id="dlg" class="easyui-dialog" style="width: 600px;height: 400px;padding: 10px 20px"
     closed="true" buttons="#dlg-buttons" data-options="onClose:function(){resetValue()}">
    <form id="fm" method="post">
        <input type="hidden" id="id" name="id">
        <table cellspacing="8px">
            <tr>
                <td>车牌号：</td>
                <td>
                    <input type="text" id="vidcard" name="vidcard" class="easyui-validatebox" required="true" />
                </td>
                <td>司机姓名：</td>
                <td>
                    <input type="text" id="show1" name="show1" class="easyui-validatebox" readonly="readonly"/>
                </td>
            </tr>
            <tr>
                <td>司机手机：</td>
                <td>
                    <input type="text" id="show2" name="show2" class="easyui-validatebox" readonly="readonly"/>
                </td>
                <td>队长姓名：</td>
                <td>
                    <input type="text" id="show3" name="show3" class="easyui-validatebox" readonly="readonly"/>
                </td>
            </tr>
            <tr>
                <td>队长手机：</td>
                <td>
                    <input type="text" id="show4" name="show4" class="easyui-validatebox" readonly="readonly"/>
                </td>
                <td>保险公司：</td>
                <td>
                    <input type="text" id="company" name="company" class="easyui-validatebox"/>
                </td>
            </tr>
            <tr>
                <td>保单名称：</td>
                <td>
                    <input type="text" id="cname" name="cname" class="easyui-validatebox"/>
                </td>
                <td>投保时间：</td>
                <td>
                    <input id="startdate" name="startdate" class="easyui-datetimebox"
                           data-options="required:true,showSeconds:false" style="width:150px"/>
                </td>
            </tr>
            <tr>
                <td>保单类型：</td>
                <td>
                    <select id="ctype" name="ctype" class="easyui-validatebox" required="true">

                    </select>
                </td>
                <td>投保周期：</td>
                <td>
                    <select id="insureType" name="insureType" class="easyui-validatebox" required="true">

                    </select>
                </td>
            </tr>
            <tr>
                <td>保单号：</td>
                <td>
                    <input type="text" id="cno" name="cno" class="easyui-validatebox" required="true"/>
                </td>
                <td id="error"></td>
                <td id="error1"></td>
            </tr>
        </table>
    </form>
</div>

<div id="dlg-buttons">
    <a href="javascript:saveInsurance()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
    <a href="javascript:closeInsuranceDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
</div>
<div id="dlg2" class="easyui-dialog" style="width: 500px;height: 400px;padding: 10px 20px"
     closed="true" buttons="#dlg-buttons2" data-options="onClose:function(){resetValue2()}">
    <form id="fm2" method="post" enctype="multipart/form-data">
        <table cellspacing="8px">
            <tr>
                <td>选择文件：</td>
                <td>
                    <input type="file" id="file" name="file" class="easyui-validatebox" required="true"/>
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="dlg-buttons2">
    <a href="javascript:importInsurance1()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
    <a href="javascript:closeInsurance1()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
</div>
</body>
</html>